<form id="form" class="layui-form" action="{:url()}" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">网站名称</label>
        <div class="layui-input-block">
            <input type="text" name="name" value="{$data['value']['name']}" placeholder="请输入" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">网站域名</label>
        <div class="layui-input-block">
            <input type="text" name="domain" value="{$data['value']['domain']}" placeholder="例：http://www.ecoci.cn" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">网站标题</label>
        <div class="layui-input-block">
            <input type="text" name="title" value="{$data['value']['title']}" placeholder="请输入" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">网站关键字</label>
        <div class="layui-input-block">
            <input type="text" name="keywords" value="{$data['value']['keywords']}" placeholder="多个用英文逗号隔开" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">网站描述</label>
        <div class="layui-input-block">
            <input type="text" name="description" value="{$data['value']['description']}" placeholder="请输入" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">网站作者</label>
        <div class="layui-input-block">
            <input type="text" name="author" value="{$data['value']['author']}" placeholder="请输入联系方式或名字" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">网站版权号</label>
        <div class="layui-input-block">
            <input type="text" name="copyright" value="{$data['value']['copyright']}" placeholder="请输入" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="button" class="layui-btn submitForm" formId="form">提交</button>
        </div>
    </div>
</form>

<script type="text/javascript">
    $(function(){
        $('.submitForm').click(function (evt) {
            formPost(evt, $(this), function (res) {
                ybLayer.msg(res.msg,{icon: 6});
                setTimeout(function () {
                    location.reload();
                }, 1000);
            }, function (res) {
                ybLayer.msg(res.msg, {icon: 5});
            });
            return false;
        });
    })
</script>